473,461 Members | 1,437 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Tooltip not appears during window.createPopup

I have two html files Parent.htm and Child .htm

Following is the code inside the Parent.htm:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title></title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
<script language=javascript>
var globalPopWindow = typeof(window) != "undefined" ?
window.createPopup() : null;
pop=globalPopWindow;
popdb=pop.document.body;

function wfCreateContextMenuHtml(xPos, ypos){
// Creating Context menu with the help of Div
var str=[];
str.push('<div style="border:outset">');
str.push('<a href="#" title="This is Test Menu">This is Test
Menu</a>');
str.push('</div>');
popdb = document.getElementById("test");
popdb.innerHTML = str.join('');
popdb.style.zIndex = 1000
popdb.style.visibility = "visible"
popdb.style.left = xPos
popdb.style.top = ypos
popdb.style.width = 135
popdb.style.height = 20
return false;
}

function wfCreateContextMenuHtml1(xPos, ypos){
// Creating Context menu with the help of window.createPopup()
var str=[];
str.push('<div style="border:outset">');
str.push('<a href="#" title="This is Test Menu">This is Test
Menu</a>');
str.push('</div>');
popdb.innerHTML = str.join('');
pop.show(xPos,ypos,135,20,popdb)
return false;
}
</script>
</head>
<body>
<a href="#">Hello Test</a>
<div id="test" style="position:absolute"></div>
<iframe src="child.htm" style="position:absolute"></iframe>
</body>
</html>
Following is the code for Child.html:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title></title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</head>
<body oncontextmenu="return
parent.wfCreateContextMenuHtml(event.clientX, event.clientY)">
<A href="#" title="Test Page" style="text-underline:none">Test Page</A>
</body>

</html>
If i call the wfCreateContextMenuHtml() mehtod using url:
http://testdomain.com/Parent.htm then tooltip is appear in the context
menu. but if i call wfCreateContextMenuHtml1() mehtod using url:
http://testdomain.com/Parent.htm then tooltip is not appear in the
context menu.

And if i access the Parent.htm file using URL
http://locahost/Parent.htm, that time in both mehtods tooltip appears.

Jul 27 '06 #1
2 3256
Tooltip will not appear during window.createpoup because of security
restriction

http://msdn.microsoft.com/library/de...ow_restric.asp

above url have detail explanation for windows.createpopup restriction.

Vivek wrote:
I have two html files Parent.htm and Child .htm

Following is the code inside the Parent.htm:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title></title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
<script language=javascript>
var globalPopWindow = typeof(window) != "undefined" ?
window.createPopup() : null;
pop=globalPopWindow;
popdb=pop.document.body;

function wfCreateContextMenuHtml(xPos, ypos){
// Creating Context menu with the help of Div
var str=[];
str.push('<div style="border:outset">');
str.push('<a href="#" title="This is Test Menu">This is Test
Menu</a>');
str.push('</div>');
popdb = document.getElementById("test");
popdb.innerHTML = str.join('');
popdb.style.zIndex = 1000
popdb.style.visibility = "visible"
popdb.style.left = xPos
popdb.style.top = ypos
popdb.style.width = 135
popdb.style.height = 20
return false;
}

function wfCreateContextMenuHtml1(xPos, ypos){
// Creating Context menu with the help of window.createPopup()
var str=[];
str.push('<div style="border:outset">');
str.push('<a href="#" title="This is Test Menu">This is Test
Menu</a>');
str.push('</div>');
popdb.innerHTML = str.join('');
pop.show(xPos,ypos,135,20,popdb)
return false;
}
</script>
</head>
<body>
<a href="#">Hello Test</a>
<div id="test" style="position:absolute"></div>
<iframe src="child.htm" style="position:absolute"></iframe>
</body>
</html>
Following is the code for Child.html:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title></title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</head>
<body oncontextmenu="return
parent.wfCreateContextMenuHtml(event.clientX, event.clientY)">
<A href="#" title="Test Page" style="text-underline:none">Test Page</A>
</body>

</html>
If i call the wfCreateContextMenuHtml() mehtod using url:
http://testdomain.com/Parent.htm then tooltip is appear in the context
menu. but if i call wfCreateContextMenuHtml1() mehtod using url:
http://testdomain.com/Parent.htm then tooltip is not appear in the
context menu.

And if i access the Parent.htm file using URL
http://locahost/Parent.htm, that time in both mehtods tooltip appears.
Jul 31 '06 #2
Vivek wrote:
I have two html files Parent.htm and Child .htm

Following is the code inside the Parent.htm:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title></title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
<script language=javascript>
The language attribute has been deprecated for many, many years in
favour of the required type attribute:

<script type="text/javascript">
I'll guess that your "GENERATOR" is inserting it automatically, maybe
it's time to get a development environment that understands web
standards after 1997.

var globalPopWindow = typeof(window) != "undefined" ?
window.createPopup() : null;
The test is ill conceived - if 'window' is anything other than
undefined you assume it has a 'createPopup' method - my browser doesn't
so throws an error.

typeof is an operator, not a function so the use of () following it is
unnecessary and somewhat misleading - it makes it look like a method.
You may like to encapsulate the statement for maintenance:

if ('object' != (typeof window)) { ... }
A better test would be:

var globalPopWindow;
if ('object' == (typeof window) &&
'function' == (typeof window.createPopup)){
globalPopWindow = window.createPopup();
}

The rest of your code assumes that the window was opened, a good number
of browsers will not open it. So test globalPopWindow before trying to
us it - if there is no popup window, skip the rest of the function.
[...]
<body oncontextmenu="return
My browser doesn't support oncontextmenu either...
parent.wfCreateContextMenuHtml(event.clientX, event.clientY)">
<A href="#" title="Test Page" style="text-underline:none">Test Page</A>
text-underline is not a valid CSS property, I think the property you
are after is text-decoration:

text-decoration: none

</body>

</html>
If i call the () mehtod using url:
http://testdomain.com/Parent.htm then tooltip is appear in the context
menu. but if i call wfCreateContextMenuHtml1() mehtod using url:
http://testdomain.com/Parent.htm then tooltip is not appear in the
context menu.

And if i access the Parent.htm file using URL
http://locahost/Parent.htm, that time in both mehtods tooltip appears.
I don't really understand what you are saying here, but you likely have
discovered cross-domain scripting isn't allowed with default security
settings.
--
Rob

Jul 31 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Rathtap | last post by:
I am using HTML labels on an ASP.net page and these show up as DIV elements in the properties window. I have set them to RUNAT="server" so that they are accessible in my C# page-behind. I noticed...
5
by: Simon Knox | last post by:
Hi I have a web app that has a legitimate use for pop up windows. My web app is an insurance quoting app. I use the window.open method to display another aspx page so that the user can check...
0
by: Angel | last post by:
I created as popup window using the createPopup() method. The innerHTML that will be displayed in the popup contains a textbox. For some reason I cannot key into the textbox. Is there a limitation...
3
by: John Walker | last post by:
Hi, I am using a popup window in my application and the problem I'm having is that even though I tell it to display before a while loop, it only displays after the while loop completes. Please...
7
exoskeleton
by: exoskeleton | last post by:
hi guys..hope you can help me...my boss want me to edit our website and apply the tooltip thing, i mean the moving tooltip that follows the mouse.. please help...thank you... :(
16
by: Charles Law | last post by:
I have to take this personally now. Tooltips have been flakey since the dawn of .NET, but to still have to put up with a disappearing tooltip in VS 2008 is getting beyond a joke. Tooltips have...
7
by: freddukes | last post by:
Okay... So this is my first project and I want to be able to make a tool tip appear with the basket contents whenever you hover over a link using the onmousehover='javascriptFunction()'. I have...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.